package com.lc.controller;

import com.github.pagehelper.PageInfo;
import com.lc.bean.Dept;
import com.lc.bean.Role;
import com.lc.service.DeptService;
import com.lc.service.RoleService;
import com.lc.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    RoleService roleService;

    // 查询列表
    @RequestMapping("/list")
    public R list(@RequestParam(defaultValue = "1") Integer pageNum,
                  @RequestParam(defaultValue = "5") Integer pageSize) {
            PageInfo<Role> pageInfo = roleService.list(pageNum,pageSize);
        return R.ok(pageInfo);
    }
}
